//
//  NSObject+Honda.h
//  Honda
//
//  Created by Wang.Xinlei on 4/9/13.
//  Copyright (c) 2013 HeninHoo. All rights reserved.
//

#import <Foundation/Foundation.h>


@protocol ValuesForPath <NSObject>

@required
- (NSArray *)valuesForComponents:(NSArray *)components;

@optional
- (id)lastValueForComponents:(NSArray *)components;
- (id)firstValueForComponents:(NSArray *)components;
- (id)valueForComponents:(NSArray *)components atIndex:(NSUInteger)index;

- (NSDate *)dateForComponents:(NSArray *)components;
- (NSArray *)arraryForComponents:(NSArray *)components;
- (NSNumber *)numberForComponents:(NSArray *)components;
- (NSString *)stringForComponents:(NSArray *)components;
- (NSDictionary *)dictionaryForComponents:(NSArray *)components;

@end


@interface NSObject (Honda) < ValuesForPath >

+ (BOOL)valid:(id)object;
+ (BOOL)invalid:(id)object;

@end


NSString * NSStringFromObject(id object);
